//
//  MyCollectionViewCell.m
//  PhoenixNews
//
//  Created by dllo on 16/1/25.
//  Copyright © 2016年 dllo. All rights reserved.
//

#import "MyCollectionViewCell.h"

@implementation MyCollectionViewCell
- (void)dealloc {
    [_image release];
    [_title release];
    [super dealloc];
}
- (instancetype)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self) {
        self.image = [[UIImageView alloc] init];
        [self.contentView addSubview:_image];
        [_image release];
        self.title = [[UILabel alloc] init];
        [self.contentView addSubview:_title];
        [_title release];
    }
    return self;
}

- (void)applyLayoutAttributes:(UICollectionViewLayoutAttributes *)layoutAttributes {
    _image.frame = CGRectMake(20, 50, 30, 30);
    _title.frame = CGRectMake(20, 80, 40, 30);
    _title.alpha  = 0.5;
    _title.font = [UIFont systemFontOfSize:15];
    _title.numberOfLines = 0;
   
}

@end
